package com.txx.java;

import org.junit.Test;

public class Test1 {

    public static void main(String[] args) {
        String s = "1";  //存放于String常量池
        String s1 = "1"; //存放于String常量池
        String s2 = new String("1"); //创建了两个对象，
        String s3 = s2;

        System.out.println(s3 == s2);
        System.out.println(s1 == s2);
        System.out.println(s == s1);
    }

    @Test
    public void test(){
        long l = 100000L;
        l +=l;
        test();

    }
}
